﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Runtime.Serialization;
//using System.ServiceModel;
//using System.ServiceModel.Web;

namespace DataService.Model
{
    public class Appointment
    {
        [DataMember]
        private DateTime _date;

        public DateTime Date 
        {
            get 
            {
                return _date;
            }
            set 
            {
                _date = value;
            }
        }//end Date field

        [DataMember]
        private DateTime _startTime;

        public DateTime StartTime 
        {
            get 
            {
                return _startTime;
            }
            set 
            {
                _startTime = value;
            }
        }//end start time field

        [DataMember]
        private DateTime _endTime;

        public DateTime EndTime 
        {
            get 
            {
                return _endTime;
            }
            set 
            {
                _endTime = value;
            }
        }//end end time field

        [DataMember]
        private string _description;

        public string Description 
        {
            get 
            {
                return _description;
            }
            set 
            {
                _description = value;
            }
        }//end description field

        [DataMember]
        private int _pkID;

        public int PKID
        {
            get
            {
                return _pkID;
            }
        }//end PKID
        [DataMember]
        private int _fkClient;

        public int fkClient
        {
            get
            {
                return _fkClient;
            }
        }//end PKID
        [DataMember]
        private int _fkOwner;

        public int fkOwner
        {
            get
            {
                return _fkOwner;
            }
        }//end PKID

        public Appointment(DateTime date, DateTime startTime, DateTime endTime, string description, int pkID, int fkClient, int fkOwner)
        {
            //fancy coding shit right here!
            Date = date;
            StartTime = startTime;//TODO parse actual hour
            EndTime = endTime;//TODO parse actual hour
            Description = description;
            this._pkID = pkID;//TODO figure out if this even works
            this._fkClient = fkClient;
            this._fkOwner = fkOwner;
        }

        //no args constructor
        public Appointment()
        {
            Appointment appointment = new Appointment();
            // TODO: Complete member initialization
        }
    }
}
